# Maintainer: Peter Budai <peterbudai at hotmail dot com>

_realname=Text-WrapI18N
pkgname=perl-${_realname}
pkgver=0.06
pkgrel=1
pkgdesc="Text::WrapI18N - Line wrapping module with support for multibyte, fullwidth, and combining characters and languages without whitespaces between words"
arch=('any')
url="https://metacpan.org/${_realname}/"
groups=("perl-modules")
license=('GPL' 'PerlArtistic')
depends=("perl" "perl-Text-CharWidth")
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/K/KU/KUBOTA/${_realname}-${pkgver}.tar.gz)
sha256sums=('4bd29a17f0c2c792d12c1005b3c276f2ab0fae39c00859ae1741d7941846a488')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR=${pkgdir}
}
